<?php
echo '
<div id="content">

<h5 class="info-title">Configuration:</h5>
<h2>Setting Up The Database</h2>
          <p>This is the MySQL configuration page.</p>
          <p>These settings are typically provided by the system administrator and are used to configure the database used by sitegeist. The account submitted, must provide sufficient read/write access as sitegeist will create tables constituting the base system. Currently only the database manager MySQL is supported. </p>
          <p>To configure the database, simply submit the data in the form and press save to store the configuration settings.</p>
<h3>MySQL Database Settings</h3>';

//include 'readcookie.php';
if (cookieExists()){
  list($host, $dbase, $uname, $passw) = readCookie();
  }else {
    echo 'Warning: Configuration Data Missing';
    $host = 'empty';
    $dbase = 'empty';
    $uname = 'empty';
    $passw = 'empty';
  }
echo'
<form action="writeconfig.php" method="post">
<table border="0">
  <tr>
    <td>Host name:</td>
    <td>
      <input type="text" name="host" size="25" value= "' , $host,'" />
    </td>
  </tr>
  <tr>
    <td>Database name:</td>
    <td>
      <input type="text" name="dbase" size="25" value= "',$dbase,'" />
    </td>
  </tr>
  <tr>
    <td>User Name:</td>
    <td><input type="text" name="uname" size="25" value= "', $uname, '"/> </td>
  </tr>
  <tr>
    <td>Password:</td>
    <td><input type="password" name="passw" size="25" value= "', $passw , '"/></td>
  </tr>

</table>
<p><input type="submit" value="Save" name="B1" /></p>
</form>
';

echo'<textarea rows="13" cols="80">',htmlentities(file_get_contents('../../../../../settings/httpd.conf')),'</textarea>';
?>
